package online.longzipeng.cinemasys.vo.resources;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;

/**
 * @author lzp
 * @date 2021/4/10 10:10
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "资源修改对象",description = "请求参数类")
public class ResourcesSaveVO {

    /**
     * 名称
     */
    @ApiModelProperty(value = "名称",example = "更新",required = true)
    @NotBlank(message = "名称不能为空！！")
    private String name;

    /**
     * 类型，button、menu
     */
    @ApiModelProperty(value = "类型",example = "button、menu",required = true)
    @NotBlank(message = "类型不能为空！！")
    private String type;

    /**
     * 对应菜单路径
     */
    @ApiModelProperty(value = "名对应菜单路径称",example = "/user/update",required = true)
    @NotBlank(message = "名称不能为空！！")
    private String url;

    /**
     * 所需权限
     */
    @ApiModelProperty(value = "所需权限",example = "user:delete",required = false)
    private String permission;

    /**
     * 父级菜单id
     */
    @ApiModelProperty(value = "父级菜单id",example = "1",required = true)
    @Min(value = 0,message = "父级菜单id必须是个数字！")
    private Long parentId;

    /**
     * 排序
     */
    @ApiModelProperty(value = "排序",example = "1",required = true)
    @Min(value = 0,message = "排序值必须是个数字！")
    private Integer sort;

    /**
     * 是否外部链接
     */
    @ApiModelProperty(value = "是否外部链接",example = "true/false",required = true)
    private Boolean external;

    /**
     * 是否有效
     */
    @ApiModelProperty(value = "是否有效",example = "true/false",required = true)
    private Boolean available;

    /**
     * 菜单图标
     */
    @ApiModelProperty(value = "菜单图标",example = "xxx.icon",required = false)
    private String icon;

}
